#include <stdio.h>
 double avg(int *arr, int size);
 int main() {
    /* 带有 5 个元素的整型数组  */
    int scores[5] = {70, 80, 87, 69, 90};
    double avgScore;
    /* 传递一个指向数组的指针作为参数 */
    avgScore = avg(scores, 5);
    /* 输出返回值  */
    printf("Average score is: %f\n", avgScore);
    return 0;
 }
 double avg(int *arr, int size) {
    int sum = 0;
    double avg;
    for (int i = 0; i < size; ++i) {
        sum += *arr;
        printf("arr存放的地址:%p \n", arr);
        arr++;
    }
    avg = (double) sum / size;
    return avg;
 }